<template>
  <div style="margin:20px;">
    <van-button type="default"
                @click="getContent">默认按钮</van-button>
    <el-editor id="contentEditor"
               ref="artEditor1">
    </el-editor>
    <div v-html="content"></div>
  </div>
</template>

<script>
import ElEditor from '@/components/ElEditor'
export default {
  components: {
    ElEditor
  },
  name: 'HelloWorld',
  data () {
    return {
      artEditor: null,
      content: ''
    }
  },
  mounted () {
    this.$nextTick(() => {
      this.artEditor1 = this.$refs.artEditor1.getEditor()
      this.artEditor1.append('<p>测试信息</p><p>测试信息</p><p>测试信息</p><p>测试信息</p><p>测试信息</p>')
    })
  },
  methods: {
    getContent () {
      this.content = this.artEditor1.getContent()
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
